package com.musemun.mapper;

import com.musemun.pojo.Er;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.musemun.pojo.Vo.NameRole;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author winner
 * @since 2020-04-27
 */
public interface ErMapper extends BaseMapper<Er> {

    @Delete("delete from er where er.eNo=#{id} and er.rid=(select role.rid from crms.role where role.role=#{role})")
    public void deleteErByEnoAndRole(@Param("id") Integer id, @Param("role") String role);


}
